# 1. 需要一个空元组

tuple_a = ()
tuple_b = tuple()


# 2. 元组数据可以重复,多种类型,嵌套...
tuple_c = ((1,2,3),3,2,"11",True,False)
print(tuple_c) # ((1, 2, 3), 3, 2, '11', True, False)


# 3. 元组是不可变序列
# tuple_c[1] = '111' # TypeError: 'tuple' object does not support item assignment



# 4. 定义只有一个元素的元组类型,需要带上括号
tuple_d = (100)
print(type(tuple_d))
# <class 'int'>

tuple_e = (100,)
print(type(tuple_e))
# <class 'tuple'>
